﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RealState.BusinessObjects;
using RealState.BLL;
using log4net;


namespace RealState.W.AdminControl
{
    public partial class ContentType : System.Web.UI.UserControl
    {
        private ContentTypesBLL m_ContentTypeBLL;
        private ContentTypes m_ContentTypeDO;
        protected ILog log = LogManager.GetLogger(typeof(ContentType));
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) {
                loadData();
            }
        }

        private void loadData(){
            m_ContentTypeBLL = new ContentTypesBLL();
            try 
	        {	        
        		rptCategories.DataSource = m_ContentTypeBLL.GetContentTypess();
                rptCategories.DataBind();
	        }
	        catch (Exception ex)
	        {
        		log.Error(ex.Message);
	        }
            finally{
                m_ContentTypeBLL =null;
            }
        }
    }
}